import request from '@/utils/request'

// 查询角色应用关联列表
export function listRoles(query) {
  return request({
    url: '/system/roles/list',
    method: 'get',
    params: query
  })
}

// 查询角色应用关联详细
export function getRoles(roleId) {
  return request({
    url: '/system/roles/' + roleId,
    method: 'get'
  })
}

// 新增角色应用关联
export function addRoles(data) {
  return request({
    url: '/system/roles',
    method: 'post',
    data: data
  })
}

// 修改角色应用关联
export function updateRoles(data) {
  return request({
    url: '/system/roles',
    method: 'put',
    data: data
  })
}

// 删除角色应用关联
export function delRoles(roleId) {
  return request({
    url: '/system/roles/' + roleId,
    method: 'delete'
  })
}
